﻿@model Blog

@{
    ViewBag.Title = "Opret ny blog";
}

<div class="page-header">
    <h1><span class="glyphicon glyphicon-book"></span> @ViewBag.Title</h1>
</div>
    
@if (!ViewData.ModelState.IsValid)
{
    <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        @Html.ValidationSummary("", new { @style = "color: #fff;" })
    </div>
}

@using (Html.BeginForm("Create", "Blog", FormMethod.Post, new { @class = "form-horizontal" })) {
    <div class="form-group">
        <label for="Name" class="col-sm-1 col-lg-1 control-label">navn</label>
        <div class="col-sm-9">
            <input type="text" id="Title" name="Title" class="form-control" required placeholder="Titel">
        </div>
    </div>
    <div class="form-group">
        <label for="Content" class="col-sm-1 col-lg-1 control-label">beskrivelse</label>
        <div class="col-sm-9">
            <textarea id="Content" name="Content" rows="5" cols="25" class="form-control" required placeholder="Skriv noget underholdende"></textarea>
        </div>
    </div>
                
    <div class="form-group">
        <label for="create" class="col-sm-1 col-lg-1 control-label"></label>
        <div class="col-sm-11">
            <button type="submit" class="btn btn-default">opret</button>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/globalize")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/Scripts/_thecup_editing.js")
}
